package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ZzShopInfoMapper;
import com.ruoyi.system.domain.ZzShopInfo;
import com.ruoyi.system.service.IZzShopInfoService;

/**
 * 商品信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-08-27
 */
@Service
public class ZzShopInfoServiceImpl implements IZzShopInfoService 
{
    @Autowired
    private ZzShopInfoMapper zzShopInfoMapper;

    /**
     * 查询商品信息
     * 
     * @param id 商品信息主键
     * @return 商品信息
     */
    @Override
    public ZzShopInfo selectZzShopInfoById(Long id)
    {
        return zzShopInfoMapper.selectZzShopInfoById(id);
    }

    /**
     * 查询商品信息列表
     * 
     * @param zzShopInfo 商品信息
     * @return 商品信息
     */
    @Override
    public List<ZzShopInfo> selectZzShopInfoList(ZzShopInfo zzShopInfo)
    {
        return zzShopInfoMapper.selectZzShopInfoList(zzShopInfo);
    }

    /**
     * 新增商品信息
     * 
     * @param zzShopInfo 商品信息
     * @return 结果
     */
    @Override
    public int insertZzShopInfo(ZzShopInfo zzShopInfo)
    {
        return zzShopInfoMapper.insertZzShopInfo(zzShopInfo);
    }

    /**
     * 修改商品信息
     * 
     * @param zzShopInfo 商品信息
     * @return 结果
     */
    @Override
    public int updateZzShopInfo(ZzShopInfo zzShopInfo)
    {
        zzShopInfo.setUpdateTime(DateUtils.getNowDate());
        return zzShopInfoMapper.updateZzShopInfo(zzShopInfo);
    }

    /**
     * 批量删除商品信息
     * 
     * @param ids 需要删除的商品信息主键
     * @return 结果
     */
    @Override
    public int deleteZzShopInfoByIds(Long[] ids)
    {
        return zzShopInfoMapper.deleteZzShopInfoByIds(ids);
    }

    /**
     * 删除商品信息信息
     * 
     * @param id 商品信息主键
     * @return 结果
     */
    @Override
    public int deleteZzShopInfoById(Long id)
    {
        return zzShopInfoMapper.deleteZzShopInfoById(id);
    }
}
